package com.hongxun.design.activitys;

import android.os.Bundle;
import android.view.View;
import android.widget.ListView;

import com.hongxun.design.MyApp;
import com.hongxun.design.R;
import com.hongxun.design.adapters.UserInfoSetAdapter;
import com.hongxun.design.interfaces.HeadSecond;
import com.hongxun.design.listeners.ListenerSet;
import com.hongxun.design.mytools.IconSourse;
import com.hongxun.design.ui.headandbottonpanel.HeadSecondControlPanel;
import com.hongxun.design.utils.DataUtil;

/**
 * Created by zerdoor_pc on 2016/6/22.
 * 个人设置
 */
public class UserInfoSetActivity extends BaseActivity implements HeadSecond {
    ListView userinfoset_list;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_userinfoset);
        findBar();
        findView();
    }

    @Override
    public void findBar() {
        HeadSecondControlPanel headsecond_layout = (HeadSecondControlPanel) findViewById(R.id.userinfoset_layout);
        headsecond_layout.initHeadPanel(DataUtil.getsecondbean("", View.GONE, R.color.bar_right, ListenerSet.back, "个人中心", R.color.title, View.VISIBLE, IconSourse.BACK + "", View.VISIBLE));
    }

    @Override
    protected void onResume() {
        super.onResume();
        MyApp.activity = this;
        mActivity = this;
        baseActivity=this;
    }

    @Override
    protected void findView() {
        super.findView();
        userinfoset_list= (ListView) findViewById(R.id.userinfoset_list);
        UserInfoSetAdapter adapter=new UserInfoSetAdapter(DataUtil.getUserItem(),this);
        userinfoset_list.setAdapter(adapter);
    }
}
